-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/Cucumber Messages #233
base: main
Are you sure you want to change the base?
Conversation
FYI, github Build is failing b/c one produced component (FileSinkPlugin) gets published only to my local Nuget store. It can then not be found by the build pipeline in github. |
First end-to-end working scenario is operational.
Next:
|
364e466
to
1f2f1e6
Compare
Build is failing b/c I have a private build of Cucumber Messages nuget package. When the next release of that comes out, I will patch up the nuget references in this branch. |
This is fine. We have feed https://www.myget.org/feed/Packages/reqnroll-unstable where we could publish interim releases (of dependencies as well) and I think this feed is added to the nuget sources, so the build would be able to resolve it though them. But I never tested this model yet. |
…zing events as Cucumber Messages.
…ecutionEvents to one or more Message Sinks. Default implementation of one Sink that serializes Messages to an ndjson file per feature. Not finished: hooking up the TestThreadExecution event handlers.
…mber Messages Publisher and Broker to the initialization sequence provided by the Plugin architecture.
…est project. The File Sink is hooked in as a nuget package. Next: exploratory debugging to confirm the event listeners are wired up correctly at Feature start time.
Need to figure out why trace logging also not working.
…check of whether it had been initialized (temp). (Temp) - added Debugger.Launch to FileSinkPlugin to force launch of debugger.
…Publisher from the FileSinkPlugIn completely.
…the use of a BlockingCollection. Eliminated base class for Sinks. Eliminated use of Async for MessageSinks. Sinks have to ensure their own thread-safety and non-blocking behavior. May want to revisit that.
…ke Messages (meta, Source, GherkinDocument, and Pickles).
… information into Messages. First example is transforming StepBinding classes into messages of type StepDefinition.
…pport for CucumberMessages for that feature.
…e, then all are published.
…ioState emit sequences of Envelopes for consumption by the Publisher.
…fter scenario completion so that we have full binding Match info available to create the TestCase message.
… simple scenarios.
minimal and pending scenarios added.
… which I don't think apply to the .NET implementation. Need to add support for images and documents as embedded resources to be added to generated test projects before attachments and hooks can be implemented and tested. Not yet added infrastructure to compare output ndjon with expected.
…lisher, Broker, and Sink). Returned FeatureTracker back to normal, sync methods.
…rectly serialized.
…at a FeatureFinishedEvent is received but not all Scenarios are yet marked as Finished, then the entire Feature success status should be set to False.
…enarios in parallel
…when two Features were rewriting simultaneously.
I believe this is now ready for a shakedown and code review. I've fixed the issues that I'm aware of and completed my punch-list. Documentation is updated. I've tested it with multiple Features running in parallel and desk-checked it for thread safety for the upcoming Scenario parallel execution model. |
It looks like Cucumber Messages schemas are changing in an upcoming release PR102. This will require some changes to logic within the Messages implementation. |
…Enums, and TestHookStarted/Finished messages. CCK compliance not yet available.
…hmentAdded events as Obsolete.
…ature class start-up. Modified FeatureInfo constructor to accept the FeatureMessages object as optional parameter. Had to modify a Runtime test to accomodate that change. Also changed Generation such that we're more thoroughly emitting the 'global::' prefix on Reqnroll types (for Messages related types). Marked the Non-Compliant CCK test scenarios as [Ignore].
…was failing now that is called well before the Messages configuration system is spun up.
…ce when throwing an 'already resolved' registration exception.
…Static Messages for a Feature were processed (which resulted in the PickleJar not being properly initialized).
Moving the FeatureTracker creation to within the double-check of the lock section (so that it is called only one time).
Updated FluentAssertion property selector rule to ignore the TestRunStartedId.
…s problems with RuntimeTests which fire events but without a full event orchestration as expected by the Publisher.
Messages v27 and CCK updates have been published. Today's commits update our Messages implementation to support this release. This adds a HookType enumeration for Hooks and a TestRunStartedId attribute to the TestRunStarted and TestRunFinished messages. |
… the TraceListener until the moment its needed rather than as a constructor param. This avoids a conflict when the Test Frameworks provide their own implementation (which caused an 'oibject already resolved' error in the object container). Related changes in Tests to match.
Draft PR to provide a space for reviews and suggestions on this Feature.
🤔 What's changed?
Adds support for creation of Cucumber Messages during the execution of Reqnroll scenarios.
Changes are in three main area:
FeatureGeneration: as a feature file is processed and used to generate C# code, the Gherkin toolchain is used to create the first few Messages for the feature. These are attached to the FeatureInfo object.
CucumberMessagePublication: written as an embedded plugin, this component listens for ExecutionEvents and converts them, and their attached state, to Cucumber Messages. These are 'published' to one or more sinks.
FileSinkPlugin: a traditional runtime plugin, this plugin registers with the Publishing component to receive the Messages as they are released by the Publisher and stored to a file (one per feature file).
Messages are strings serialized from the CucumberMessage Envelope format and stored one per line in an ".ndjson" result file.
⚡️ What's your motivation?
To provide future compatibility with the broader Cucumber eco-system of tooling.
To provide the input to a future implementation of a Reqnroll replacement to LivingDocs.
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
Anything.
📋 Checklist: